#include <stdio.h>
#include <math.h>

typedef unsigned long u64;
u64 max_cnum(u64 n1, u64 n2)
{
    if (n2 == 0) return n1;
    return max_cnum(n2, n1%n2);
}

int main()
{
    u64 n1, n2;
    scanf("%ld", &n1);
    scanf("%ld", &n2);
    printf("%ld and %ld max cnum is: %ld\n", n1, n2, max_cnum(n1, n2));
    return 0;
}

